﻿Public Class LogInUser
    Inherits System.Web.Services.Protocols.SoapHeader
    Public Property userName() As String
        Get
            Return m_userName
        End Get
        Set(ByVal value As String)
            m_userName = value
        End Set
    End Property
    Private m_userName As String
    Public Property password() As String
        Get
            Return m_password
        End Get
        Set(ByVal value As String)
            m_password = value
        End Set
    End Property
    Private m_password As String
    Public Function IsValid() As Boolean
        Dim user As New oUser
        Dim dsUser As DataSet = user.GetLogin("PromotionEngine", Me.userName, Me.password)
        If dsUser IsNot Nothing AndAlso dsUser.Tables.Count > 0 AndAlso dsUser.Tables(0).Rows.Count > 0 Then
            Return True
        End If
        Return False
    End Function
End Class